<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>递归</title>
</head>
<body>
    
    <script>
        
        function fn (num) {
            if(num > 0){
                console.log('1 - ' + num)
                num --;
                console.log('2 - ' + num)
                fn(num);
                console.log('3 - ' + num)
            }
        }
        fn(10);
    
    </script>
</body>
</html>